<template>
	<div :class="[liveCurProductBoxClass]" v-html="htmlConnect">
	</div>
</template>

<script>
	export default{
		props:{
			noNavLength:String,//noNav  没有nav
		},
		data(){
			return {
				liveCurProductBoxClass :'',
				htmlConnect:'',
				getPlatform: fun.getPlatform(), //app wx
			}
		},
		created(){
			if(this.noNavLength == 'noNav'){
				if(this.$channel=='zyzq'&& this.getPlatform == 'app'){
                  this.liveCurProductBoxClass = 'no-nav-zyzq';
				}else{
                  this.liveCurProductBoxClass = 'no-nav';
				} 
			    
			}else{
				if(this.$channel=='zyzq'&& this.getPlatform == 'app'){
                    this.liveCurProductBoxClass = 'live-cur-product-box-zyzq';
				}else{
					this.liveCurProductBoxClass = 'live-cur-product-box';
				}
				
			}
		},
		mounted(){
			this.getCurProductData();
		},
		methods:{
			getCurProductData(){
				let _this = this;
				_this.$http.get('/h5live/getTableContent?roomId='+_this.$route.params.roomid).then((res) => {
					const {code,data} = res.data
					if(code=='000000'){
						_this.htmlConnect = data.content;
					}
				},(err) => {
					console.log(err);
				})
			}
		}
	}
</script>

<style scoped="scoped">
	::-webkit-scrollbar {
		display: none; /* Chrome Safari */
	}
	.live-cur-product-box{
		width: 100%;
		height: calc(100vh - 564px);
		padding:   20px 20px 0  20px;
		overflow-y: scroll;
	}
	.live-cur-product-box-zyzq{
		width: 100%;
		height: calc(100vh - 660px);
		padding:   20px 20px 0  20px;
		overflow-y: scroll;
	}
    .no-nav{
		width: 100%;
		height: calc(100vh - 494px);
		padding:   20px 20px 0  20px;
		overflow-y: scroll;
	}
	.no-nav-zyzq{
		width: 100%;
		height: calc(100vh - 590px);
		padding:   20px 20px 0  20px;
		overflow-y: scroll;
	}
	.live-cur-product-box >>> img,.no-nav >>> img{ 
		max-width: calc(100% - 40px) !important;
	}
	.live-cur-product-box-zyzq >>> img,.no-nav-zyzq >>> img{ 
		max-width: calc(100% - 40px) !important;
	}
</style>